//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_airmarkermove.sqf"
#include "x_setup.sqf"

private ["_vec", "_markern"];
_vec = _this;
sleep 30;
if (!isNull _vec && {alive _vec} && {canMove _vec} && {!GVAR(banti_airdown)}) then {
	_markern = str(_vec) + str(GVAR(airmarker_counter));
	__INC(GVAR(airmarker_counter));
	[_markern, [0,0,0],"ICON","ColorRed",[0.5,0.5],(localize "STR_DOM_MISSIONSTRING_963"),0,"n_air"] call FUNC(CreateMarkerGlobal);
	while {!isNull _vec && {alive _vec} && {canMove _vec} && {!GVAR(banti_airdown)}} do {
		_markern setMarkerPos (getPosASL _vec);
		sleep (3 + random 1);
	};
	deleteMarker _markern;
};